library(foreign)

A<-read.dta("ssi january 2012 wave 1.dta")

attach(A[!is.na(A$tts_news) & !is.na(A$ttr_kt) & !is.na(A$ttr_nes) & !is.na(A$ttr_sunk),])

d<-screener_interest
z1<-trained_news
z2<-trained_interest

png("figure2.png", width=5,height=5,units="in",res=1200)

plot(density(log(ttr_nes[d==1&z1==0&z2==0])),ylim=c(0,1),xlab="Log seconds", main="")
lines(density(log(ttr_nes[d==0&z1==0&z2==0])),lty=2)
legend("topright",lty=1:2,c("Passed Screener","Failed Screener"))

dev.off()

